<template name="userlist">
{{>sAlert}}
	<table class="table table-responsive">
		<thead>
			<tr>
				<th>
					姓名
				</th>
				<th>昵称</th>
				<th>备注</th>
				<th>操作</th>
			</tr>
		</thead>
		<tbody>
			{{#each userlist}}
				<tr>
					<td>{{username}}</td>
					<td>{{nickname}}</td>
					<td>{{#if remark}}{{remark}}{{else}}暂无备注{{/if}}</td>
					<td><a href="#" class="delfriends" data-id="{{id}}">删除</a>|<a href="#" data-id="{{id}}" data-remark="{{remark}}" data-toggle="modal" class="showmodal">备注</a>|<a href="/chattoperson/{{id}}">聊天</a></td>
				</tr>
			{{/each}}
		</tbody>
		<tfoot>
			<tr>
				<td colspan="4">{{>pagination}}</td>
			</tr>
		</tfoot>
	</table>
	<!-- Modal -->
<div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
  <div class="modal-dialog" role="document">
    <div class="modal-content">
      <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
        <h4 class="modal-title" id="myModalLabel">修改备注</h4>
      </div>
      <div class="modal-body">
        <input type="text" name="remark" id="remark">
      </div>
      <div class="modal-footer">
        <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
        <button type="button" class="btn btn-primary">提交</button>
      </div>
    </div>
  </div>
</div>
</template>